//
//  InformationDetailStateApi.m
//  gamebox_qpp
//
//  Created by 赵隆杰 on 2022/1/6.
//

#import "InformationDetailStateApi.h"

@implementation InformationDetailStateApi
{
    NSString *_informationId;
}

- (instancetype)initWithInformationId:(NSString *)informationId
{
    self = [super init];
    if (self) {
        _informationId = informationId;
    }
    return self;
}

- (NSString *)requestUrl {
    
    return @"user-message-relation/getState";
}

- (YTKRequestMethod)requestMethod {
    return YTKRequestMethodGET;
}

- (id)requestArgument {
    
    NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
    params[@"userId"] = [LocalData fetchUserInfo].userId;
    params[@"messageDetailId"] = _informationId;
    
    return params;
}

- (void)requestCompleteFilter
{
    self.state = -1;
    if (self.success) {
        NSString *state = [NSString stringWithFormat:@"%@", self.res];
        self.state = [state integerValue];
    }
}

@end
